package DataStorageClasses;

import java.sql.Date;

import org.json.JSONException;
import org.json.JSONObject;

public class TimeSheet 
{
	private long jobID;
	private long empID;
	private Date date;
	private double hours;
	private boolean wasPayed;
	
	public TimeSheet(long job, long emp, Date date, double hours, boolean payed)
	{
		this.jobID = job;
		this.empID = emp;
		this.date = date;
		this.hours = hours;
		this.wasPayed = payed;
	}
	
	public long getJobID()
	{
		return jobID;
	}
	
	public long getEmployeeID()
	{
		return empID;
	}
	
	public Date getDate()
	{
		return date;
	}
	
	public double getHours()
	{
		return hours;
	}
	
	public boolean wasPayed()
	{
		return wasPayed;
	}
	
	public JSONObject getJSONObject() throws JSONException
	{
		JSONObject json = new JSONObject();
		
		json.put("jobID", jobID);
		json.put("empID", empID);
		json.put("date", date);
		json.put("hours", hours);
		json.put("payed", wasPayed);
		
		return json;
	}
}
